import axios from "axios";
import nprogress from "nprogress";
import "nprogress/nprogress.css";

const service = axios.create({
  // baseURL: "http://localhost:8081",
  timeout: 5000,
  withCredentials: true,
});

service.interceptors.request.use((config) => {
  nprogress.start();
  return config;
});

service.interceptors.response.use((res) => {
  nprogress.done();
  return res;
});

export default service;
